﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<string>" %>
<div style="margin-top:5px;">
    <span style="font-size:15px;font-weight:bold;">相关消息</span>&nbsp;&nbsp;&nbsp;<span style="margin-left:80px;">
     <a href="<%:!string.IsNullOrEmpty(Model) ? "/home/Message/" + Model : "/home/Message"%>" style=" text-decoration: underline;">更多</a></span></div>
<ul id="sItem">
</ul>
<script type="text/javascript">
    $(document).ready(function () {

        var init = true;
        var ajaxurl = '<%:!string.IsNullOrEmpty(Model) ? "/home/RefreshMessageById/?id=" + Model : "/home/RefreshMessage/?tt=11"%>'
        $("#messages").messageScoll({
            url: ajaxurl,
            speed: 1000,
            timer: 3000
        });
    });

    function RefreshMessageList(id,name,content,date) {
        
            var ul = $("#messages").eq(0).find("ul:first");
            if ($("li#" + id, ul).length == 0) {
                ul.append("<li id='" + id + "'>" + name + ":" + content + "</li>");
            }
        

    }
</script>
<style type="text/css">
    #messages{   overflow:hidden;}
    #messages ul{margin:0;padding:0; width:180px;list-style:none;}
    #messages li{margin:0;padding:0; width:180px;list-style:none;white-space:normal; word-break:break-all;color:#fff; border-bottom:1px #ccc dashed;}
    #messages h4, #messages span{color:orange;}
    
    *{font-family:"微软雅黑",Georgia,Serif; }
    </style>
